package com.t216.dm216.controller;

import com.t216.dm216.common.Result;
import com.t216.dm216.pojo.dto.DmSeatDTO;
import com.t216.dm216.service.DmSchedulerSeatService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/scheduler/api/p")
public class DmSchedulerController {
    @Resource
    private DmSchedulerSeatService dmSchedulerSeatService;
    @PostMapping("/queryOriginalCinemaSeatArray")
    public Result queryOriginalCinemaSeatArray(@RequestBody DmSeatDTO seatDTO){
        return Result.success(dmSchedulerSeatService.getSeatArray(seatDTO));
    }

    @PostMapping("/queryCinemaSeatArrayByScheduleId")
    public Result queryCinemaSeatArrayByScheduleId(@RequestBody DmSeatDTO seatDTO){
        return Result.success(dmSchedulerSeatService.getCinemaSeatArrayByScheduleId(seatDTO));
    }
}
